<style>
.content_i .left{
	width:500px;
	overflow:hidden;
	float:left;
}

.content_i .center{
	width:220px;
	overflow:hidden;
	float:left;;
}

</style>

<div class="content">
	<div class="content_i">
    	<div class="list_button">
			<?php
				$this->widget("application.modules.system.widgets.ConfigWidget");
            ?>
        </div>
   
    <?php
		
		if (strlen($message))
		{
			echo "<div style='padding:5px; width:50%;  height:15px; background-color:#d8e9ff; 
				border-top: 1px solid #3474c2; border-bottom: 1px solid #3474c2;'>";
			echo $message ;
			echo "</div>";
		}
		
	?>
    
    <?php 
		echo CHtml::beginForm(
			array($this->controller_id."/save_thongtinchung"),
			"post", 
			array("id"=>"form_edit")
		); 
	?>
    
    <table cellpadding="3" cellspacing="0" width="100%" border="0">
    <tr>
    	<td width="500px">
        	<?php
				echo "<h2>";
				echo CHtml::image(Yii::app()->baseUrl."/assets/icon/icon-16-info.png");
				echo " Thông tin chung";
				echo "</h2>";
					echo "<table cellpadding='3' cellspacing='0 border='0' width='100%'>";
					
						echo "<tr>";
							echo "<td class='label' width='120'>"."Tên công ty"."</td>";
							echo "<td>";
								echo CHtml::textField("name", $company["name"], 
								array('style'=>'width:350px'));
							echo "</td>";
						echo "</tr>";
						
						echo "<tr>";
							echo "<td class='label' width='100'>"."Địa chỉ"."</td>";
							echo "<td>";
								echo CHtml::textField("address", $company["address"], 
								array('style'=>'width:350px'));
							echo "</td>";
						echo "</tr>";
						
						echo "<tr>";
							echo "<td class='label' width='100'>"."Văn phòng"."</td>";
							echo "<td>";
								echo CHtml::textField("office", $company["office"], 
								array('style'=>'width:350px'));
							echo "</td>";
						echo "</tr>";
						
						echo "<tr>";
							echo "<td class='label' width='100'>"."Số điện thoại"."</td>";
							echo "<td>";
								echo CHtml::textField("phone", $company["phone"], 
								array('style'=>'width:350px'));
							echo "</td>";
						echo "</tr>";
						
						echo "<tr>";
							echo "<td class='label' width='100'>"."Hot line"."</td>";
							echo "<td>";
								echo CHtml::textField("hotline", $company["hotline"], 
								array('style'=>'width:350px'));
							echo "</td>";
						echo "</tr>";
						
						echo "<tr>";
							echo "<td class='label' width='100'>"."Email"."</td>";
							echo "<td>";
								echo CHtml::textField("email", $company["email"], 
								array('style'=>'width:350px'));
							echo "</td>";
						echo "</tr>";
						
						echo "<tr>";
							echo "<td class='label' width='100'>"."website"."</td>";
							echo "<td>";
								echo CHtml::textField("website", $company["website"], 
								array('style'=>'width:350px'));
							echo "</td>";
						echo "</tr>";
						
						echo "<tr>";
							echo "<td class='label' width='100'>"."Mã số thuế"."</td>";
							echo "<td>";
								echo CHtml::textField("tax_code", $company["tax_code"], 
								array('style'=>'width:350px'));
							echo "</td>";
						echo "</tr>";
						
						
						echo "<tr>";
							echo "<td class='label' width='100'>"."Giám đốc"."</td>";
							echo "<td>";
								echo CHtml::textField("director_name", $company["director_name"], 
								array('style'=>'width:350px'));
							echo "</td>";
						echo "</tr>";
						
						echo "<tr>";
							echo "<td class='label' width='100'>"."Kế toán trưởng"."</td>";
							echo "<td>";
								echo CHtml::textField("chief_accountant", $company["chief_accountant"], 
								array('style'=>'width:350px'));
							echo "</td>";
						echo "</tr>";
						
						echo "<tr>";
							echo "<td class='label' width='100'>"."Thủ quỹ"."</td>";
							echo "<td>";
								echo CHtml::textField("cashier_name", $company["cashier_name"], 
								array('style'=>'width:350px'));
							echo "</td>";
						echo "</tr>";
						
					echo "</table>";
			?>
        </td>
        
        
        
        <td width="260">
        	<?php
				echo "<h2>";
				echo CHtml::image(Yii::app()->baseUrl."/assets/icon/icon-16-session.png");
				echo " Logo";
				echo "</h2>";
				echo CHtml::textArea("logo",$company["logo"],
				 array("style"=>"width:250px; height:230px;") );
			?>
        </td>
    
    
        
        <td>
        	<?php
				echo "<h2>";
				echo CHtml::image(Yii::app()->baseUrl."/assets/icon/icon-16-jpg.png");
				echo " Hình đại diện";
				echo "</h2>";
				echo CHtml::textArea("image",$company["image"],
				 array("style"=>"width:350px; height:230px;") );
			?>
        </td>
    
        
    </tr>
    
    <tr>
    	<td colspan="3">
        	<?php
				echo "<div class='space_5'></div>";
				echo "<div style='float:left; width:115px; height:20px;'></div>";
				echo 
					"<div class='button' id='button_submit'>" .
						"<div style='float:left; width:20px;'>" .
							CHtml::image(Yii::app()->baseUrl."/assets/icon/icon-16-save.png") .
						"</div>" .
						"<div style='float:left; min-width:40px;font-weight:bold'>".
							"Save" .
						"</div>" .
					"</div>";
				
				echo 
					"<div class='button' id='button_cancel'>" .
						"<div style='float:left; width:20px;'>" .
							CHtml::image(Yii::app()->baseUrl."/assets/icon/icon-16-check.png") .
						"</div>" .
						"<div style='float:left; min-width:50px;font-weight:bold'>".
							"Reset" .
						"</div>" .
					"</div>";
					
			?>
        </td>
    </tr>
    </table>
    
    <?php echo CHtml::endForm(); ?>
    </div>
</div><!-- end div right -->

<?php echo CHtml::scriptFile('assets/tiny_mce/tiny_mce.js'); ?>
<?php echo CHtml::scriptFile('assets/js/editor_tinymce.js'); ?>

<script type="text/javascript">
	tinymce_image("logo");
	tinymce_image("image");
</script>

<script language="javascript">
$(document).ready(function(){
	$('#button_submit').click(function(){
		$('#form_edit').submit();
	});
	
	$('#button_cancel').click(function(){
		$('#form_edit')[0].reset();
	});
});
</script>
